package com.tuling.vipes.bean;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.elasticsearch.common.geo.GeoPoint;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;
import org.springframework.data.elasticsearch.annotations.GeoPointField;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Document(indexName = "hotel_info", replicas = 1, shards = 1, createIndex = true)
public class HotelInfo {

    @Id
    @Field(index = true, store = true, type = FieldType.Keyword)
    private Long id;

    @Field(index = false, store = true, type = FieldType.Text,analyzer = "ik_max_word",searchAnalyzer = "ik_max_word")
    private String hotelName;

    /**
     * 酒店经纬度
     */

    @GeoPointField
    private GeoPoint location;
}
